package com.knowif.pojo;

import java.util.List;

/**
 * 
 * 
 * @author wcyong
 * 
 * @date 2019-06-05
 */
public class Special {
    private Integer id;

    private Integer schoolId;

    /**
     * 专业名称
     */
    private String specialName;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getSchoolId() {
        return schoolId;
    }

    public void setSchoolId(Integer schoolId) {
        this.schoolId = schoolId;
    }

    public String getSpecialName() {
        return specialName;
    }

    public void setSpecialName(String specialName) {
        this.specialName = specialName == null ? null : specialName.trim();
    }
    
    public static String getSpecialName(List<Special> specials,Integer specialId){
    	if(specials == null || specials.isEmpty()){
    		return null;
    	}
    	for(Special special : specials){
    		if(special.getId() != null && special.getId().equals(specialId)){
    			return special.getSpecialName();
    		}
    	}
    	return null;
    }
}